package com.neo.springcloud.alibaba.service.impl;

import com.neo.springcloud.alibaba.dao.StorageDao;
import com.neo.springcloud.alibaba.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName: StorageServiceImpl
 * @Title: cloud2021
 * @Package: com.neo.springcloud.alibaba.service.impl
 * @Description:
 * @Author: Kisen
 * @Date: 2021/11/25 22:19
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {
        log.info("库存微服务扣减库存开始");
        storageDao.decrease(productId, count);
        log.info("库存微服务扣减库存结束");
    }
}
